<template>
  <div class="lunbo-wrap">
    <el-carousel indicator-position="outside" height="440px">
      <el-carousel-item v-for="(item,indedx) in listlb" :key="indedx">
        <h3><img :src="item.lunbo" alt="轮播"></h3>
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
export default {
  data(){
    return{
      listlb:""
    }
  },
  methods:{
    lunbol(){
      this.$http.get('/lunbo').then(res=>{
        // console.log(res.data);
        this.listlb = res.data
      }).catch(err=>{
        console.log(err);
      })
    }
  },
  created(){
    this.lunbol()
  }
};
</script>
<style>
.lunbo-wrap {

  width: 1350px;
  margin: 90px auto -40px auto;
}

.el-carousel__item h3 {
  font-size: 18px;
  line-height: 300px;
  margin: 0;
}

.el-carousel__item:nth-child(2n) {
  background-color: #cfd6df;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #cfd6df;
}
</style>
